// @ts-nocheck
// 对外暴露的配置路由
// 常量路由
export const constantRoute = [
  {
    path: "/login",
    component: () => import("@/views/login/index.vue"),
    name: "login", // 命名路由
    meta: {
      title: "登录",
      hidden: true, // 路由是否隐藏：true隐藏，false显示
      keepAlive: false,
    },
  },
  {
    path: "/404",
    component: () => import("@/views/404/index.vue"),
    name: "404", // 命名路由
    meta: {
      title: "404",
      hidden: true, // 路由是否隐藏：true隐藏，false显示
      keepAlive: false,
    },
  },
  {
    path: "/",
    component: () => import("@/views/layout/index.vue"),
    name: "layout", // 命名路由
    meta: {
      title: "个人中心1",
      hidden: false, // 路由是否隐藏：true隐藏，false显示
      keepAlive: true,
      icon: "Flag",
    },
    redirect: '/home',
    children: [{
      path: '/home',
      name: "home", // 命名路由
      component: () => import("@/views/home/index.vue"),
      meta: {
        title: "个人中心2",
        hidden: false, // 路由是否隐藏：true隐藏，false显示
        keepAlive: true,
        icon: "Flag",
      },
    }, {
      path: '/alc',
      name: "alc", // 命名路由
      component: () => import("@/views/alc/index.vue"),
      meta: {
        title: "设置中心",
        hidden: false, // 路由是否隐藏：true隐藏，false显示
        keepAlive: true,
        icon: "Avatar",
      },
    },


    ]
  },

];

// 异步路由
export const asyncRoutes = [
  {
    path: "/home1",
    component: () => import("@/views/layout/index.vue"),
    name: "layout", // 命名路由
    meta: {
      title: "个人中心1",
      hidden: false, // 路由是否隐藏：true隐藏，false显示
      keepAlive: true,
      icon: "Flag",
    },
    redirect: '/home2',
    children: [{
      path: '/home2',
      name: "home2", // 命名路由
      component: () => import("@/views/home/index.vue"),
      meta: {
        title: "个人中心2",
        hidden: false, // 路由是否隐藏：true隐藏，false显示
        keepAlive: true,
        icon: "Flag",
      },
    }, {
      path: '/alc3',
      name: "alc3", // 命名路由
      component: () => import("@/views/alc/index.vue"),
      meta: {
        title: "设置中心",
        hidden: false, // 路由是否隐藏：true隐藏，false显示
        keepAlive: true,
        icon: "Avatar",
      },
    },

    ]
  }
]
// 任意路由
export const anyRoutes = {
  path: "/:pathMatch(.*)*",
  redirect: "/404",
  name: "any",
  meta: {
    title: "任意路由",
    hidden: true, // 路由是否隐藏：true隐藏，false显示
    keepAlive: false,
  },
}
